package com.wx.spider.sql.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wx.spider.common.pojo.db.User;
import com.wx.spider.db.annotation.DataSource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author:feng
 * @create:2021-04-19 10:56
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select id, name from user")
    List<User> findAll();

    @Select("select id, name from user")
    @DataSource(name="sec")
    List<User> findAll2();
}
